package com.jx.driving.request.domain;

import com.jx.driving.protocol.terminal.annotation.ByteAnnotation;
import com.jx.driving.protocol.terminal.annotation.LimitedStringAnnotation;
import com.jx.driving.protocol.terminal.annotation.StringAnnotation;
import com.jx.driving.protocol.terminal.annotation.TerminalAnnotation;
import com.jx.driving.protocol.terminal.annotation.WordAnnotation;

/**
 * 终端控制命令2
 * @author shenliuyang
 *
 * 2016年10月26日下午4:11:02
 */
@TerminalAnnotation
public class TerminalInstruction2 implements TerminalInstruction {
	@ByteAnnotation(order = 1)
	private short connectionOrder;//连接控制
	@LimitedStringAnnotation(value = 1, order = 2)
	private String splitSymbol = ";";
	@StringAnnotation(order = 3)
	private String suAuthenticationCode;//监管平台鉴权码
	@LimitedStringAnnotation(value = 1, order = 4)
	private String splitSymbol1 = ";";
	@StringAnnotation(order = 5)
	private String dialingAddress;//拨号点名称
	@LimitedStringAnnotation(value = 1, order = 6)
	private String splitSymbol2 = ";";
	@StringAnnotation(order = 7)
	private String dialingUserName;//拨号用户名
	@LimitedStringAnnotation(value = 1, order = 8)
	private String splitSymbol3 = ";";
	@StringAnnotation(order = 9)
	private String dialingPassword;//拨号密码
	@LimitedStringAnnotation(value = 1, order = 10)
	private String splitSymbol4 = ";";
	@StringAnnotation(order = 11)
	private String ipAddress;//IP地址
	@LimitedStringAnnotation(value = 1, order = 12)
	private String splitSymbol5 = ";";
	@WordAnnotation(order = 13)
	private Integer tcpPort;//TCP端口
	@LimitedStringAnnotation(value = 1, order = 14)
	private String splitSymbol6 = ";";
	@WordAnnotation(order = 15)
	private Integer udpPort;//UDP端口
	@LimitedStringAnnotation(value = 1, order = 16)
	private String splitSymbol7 = ";";
	@WordAnnotation(order = 17)
	private Integer serverConnectionTime;//连接到指定服务器时限

	public short getConnectionOrder() {
		return connectionOrder;
	}

	public void setConnectionOrder(short connectionOrder) {
		this.connectionOrder = connectionOrder;
	}

	public String getSuAuthenticationCode() {
		return suAuthenticationCode;
	}

	public void setSuAuthenticationCode(String suAuthenticationCode) {
		this.suAuthenticationCode = suAuthenticationCode;
	}

	public String getDialingAddress() {
		return dialingAddress;
	}

	public void setDialingAddress(String dialingAddress) {
		this.dialingAddress = dialingAddress;
	}

	public String getDialingUserName() {
		return dialingUserName;
	}

	public void setDialingUserName(String dialingUserName) {
		this.dialingUserName = dialingUserName;
	}

	public String getDialingPassword() {
		return dialingPassword;
	}

	public void setDialingPassword(String dialingPassword) {
		this.dialingPassword = dialingPassword;
	}

	public String getIpAddress() {
		return ipAddress;
	}

	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	public Integer getTcpPort() {
		return tcpPort;
	}

	public void setTcpPort(Integer tcpPort) {
		this.tcpPort = tcpPort;
	}

	public Integer getUdpPort() {
		return udpPort;
	}

	public void setUdpPort(Integer udpPort) {
		this.udpPort = udpPort;
	}

	public Integer getServerConnectionTime() {
		return serverConnectionTime;
	}

	public void setServerConnectionTime(Integer serverConnectionTime) {
		this.serverConnectionTime = serverConnectionTime;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("TerminalInstruction2 [connectionOrder=").append(connectionOrder)
				.append(", suAuthenticationCode=").append(suAuthenticationCode).append(", dialingAddress=")
				.append(dialingAddress).append(", dialingUserName=").append(dialingUserName)
				.append(", dialingPassword=").append(dialingPassword).append(", ipAddress=").append(ipAddress)
				.append(", tcpPort=").append(tcpPort).append(", udpPort=").append(udpPort)
				.append(", serverConnectionTime=").append(serverConnectionTime).append("]");
		return builder.toString();
	}

}
